<%@page import="com.kd.bean.recruiter.Recruiter_basic"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%
	Recruiter_basic basicMsg = (Recruiter_basic)session.getAttribute("basicMsg");
	if(basicMsg==null){
		response.sendRedirect("/view/login.jsp");
	}
%>
<link rel="stylesheet" href="/css/jobMain.css" />
<link rel="stylesheet" href="/css/thisAlter.css" />
<script type="text/javascript" src="/js/jquery-1.11.0.js" ></script>
<script type="text/javascript" src="/js/job/jobPersonData.js" ></script>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="">
		<div class="top-div">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td><span class="top-log">工作无忧</span></td>
					<td width="20%"></td>
					<td><a href="/view/job/jobMain.jsp" class="top-a">发布招聘信息</a></td>
					<td><a href="/view/job/jobInterview.jsp" class="top-a">面试消息</a></td>
					<td style="background-color:#ccc;"><a href="/view/job/jobPersonData.jsp" class="top-a">修改资料</a></td>
					<td><a href="/view/job/jobMyMessage.jsp" class="top-a">我的消息</a></td>
					<td><a href="/view/job/jobNotice.jsp" class="top-a">查看系统公告</a></td>
					<td><a href="/recruiter/basicEsc" class="top-a">退出</a></td>
					<td width="10%"></td>
					<td>
						<table border="0" style="text-align: left;" cellpadding="0"
							cellspacing="0">
							<tr>
								<td rowspan="2" width="50" align='center'>
									<img src="/image/${basicMsg.recruiter_img }" align="center" width="60px" height="60px" class="img-thumbnail"></td>
								<td width="170" style="color: white;">用户名：${basicMsg.recruiter_name }</td>
							</tr>
							<tr>
								<td style="color: white;">招聘状态：${basicMsg.recruiter_statei==1?"禁用":"启用" }</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>

		<div class="main-body-div">
			<table border="0"class="main-body-table">
				<tr>
					<td width="15%">
						<div style="width: 100%;">
							<table border="0" width="90%" align="center">
								<tr>
									<th height="100">
										<a href="javascript:showUpdatePersonData()">
											<input type='button' value="修改个人资料" class="btn btn-default btn-lg btn-block">
										</a>
									</th>
								</tr>
								<tr>
									<th >
										<a href="javascript:showUpateMyPwd()">
											<input type="button" value="修改密码" class="btn btn-default btn-lg btn-block">
										</a>
									</th>
								</tr>
								<tr>
									<th height="100">
										<c:if test="${basicMsg.company_id==null }" >
											<a href="javascript:showInsertCompanyData()">
												<input type='button' value='补充公司资料' class="btn btn-default btn-lg btn-block">
											</a>
										</c:if>
										<c:if test="${basicMsg.company_id!=null }" >
											<a href="javascript:showUpdateCompanyData()">
												<input type='button' value='修改公司资料' class="btn btn-default btn-lg btn-block">
											</a>
										</c:if>
									</th>
								</tr>
								<tr>
									<td height="450"></td>
								</tr>
							</table>
						</div>
					</td>
					<td>
						<div class="content">
							<div style="padding-top:2%;">
								<font size='6' id="top_font" >修改个人资料</font>
							</div>
							<hr width="98%" align="left" color="#000000">
							<div class="content-body">
								<!-- 修改个人资料 -->
								<div id="UpdatePersonDataDiv" style="width:100%;">
									<form action="/recruiter/updateBasic" onsubmit="return checkAll()" method="post" enctype="multipart/form-data" id="myUpdatePersonDataForm" style="width:60%;margin-left:20%;">
										<table class="table table-striped table-hover" width="100%">
											<tr>
												<td align="right">头像：</td>
												<td>
													<input type='file' name="myFile" onchange="getImgURL(this)" id="myFile">
													<img src="img/个人.png" width="75" height="75" id="fileImg" class="img-thumbnail"/>
												</td>
											</tr>
											<tr>
												<td align="right">昵称：</td>
												<td><input type='text' name="recruiter_name" required id="updteRecruiter_name" class="form-control"></td>
											</tr>
											<tr>
												<td align="right">手机号码：</td>
												<td><input type='text' name="recruiter_phone" required id="updteRecruiter_phone" class="form-control"></td>
											</tr>
											<tr>
												<td align="right">邮箱：</td>
												<td><input type='text' name="recruiter_email" required id="updteRecruiter_email" class="form-control"></td>
											</tr>
											<tr>
												<td align="right">身份证号码：</td>
												<td><input type='text' name="recruiter_card" required id="updteRecruiter_card" class="form-control"></td>
											</tr>
											<tr>
												<td align="right">简介：</td>
												<td>
													<textarea name="recruiter_msg" id="updteRecruiter_msg" required class="form-control" rows="3">
													</textarea>
												</td>
											</tr>
											<tr>
												<td align="center" colspan="2">
													<input type='submit' value="修改" class="btn btn-default">
												</td>
											</tr>
										</table>
									</form>
								</div>
								<!-- 修改密码 -->
								<div id="UpateMyPwdDiv" style="display:none;">
									<form action="/recruiter/updateBasicPwd" onsubmit="return checkUpdatePassword()" style="width:40%;margin-left:28%;">
										<table class="table table-striped table-hover">
											<tr>
												<td class="info text-info">当前登录的账号:${basicMsg.recruiter_phone }</td>
											</tr>
											<tr>
												<td>
													<input type="password" name="jiu_ps" id="jiu_ps" placeholder="旧密码" class="form-control">
												</td>
											</tr>
											<tr>
												<td>
													<input type="password" name="recruiter_ps" id="basic_password" placeholder="新密码" class="form-control">
												</td>
											</tr>
											<tr>
												<td>
													<input type="password" placeholder="确认新密码" id="basic_password2" class="form-control">
												</td>
											</tr>	
											<tr>
												<td>
													<input type="submit" id="updateMyPwdFormBut" value="确认修改密码" class="btn btn-default">
												</td>
											</tr>
										</table>
									</form>
								</div>
								<!-- 补充公司资料 -->
								<div id="insertCompanyDataDiv" style="display:none;">
									<form action="/company/insertCompanyMsg" method="post" enctype="multipart/form-data" id="insertCompanyData" style="width:50%;margin-left:25%;">
										<table border="0"  class="table table-striped table-hover" style="text-align:right;">
											<tr>
												<td >公司名:</td>
												<td><input type="text" name="company_name" required class="form-control"></td>
											</tr>
											<tr>
												<td>公司log图：</td>
												<td><input type="file" name="myFile"></td>
											</tr>		
											<tr>
												<td>公司地址：</td>
												<td><input type="text" name="company_address" required class="form-control"></td>
											</tr>	
											<tr>
												<td>公司联系电话：</td>
												<td><input type="text" name="company_phone" required class="form-control"></td>
											</tr>	
											<tr>
												<td>公司介绍：</td>
												<td>
													<textarea name="company_introduce" required class="form-control" rows="4">
												
													</textarea>
												</td>
											</tr>
											<tr>
												<td align='center' colspan="2">
													<input type="submit" id="insertCompanyDataBut" value="确认补充公司资料" class="btn btn-default">
												</td>
											</tr>
										</table>
									</form>
								</div>
								<!-- 修改公司资料 -->
								<div id="updateCompanyDataDiv" style="display:none;">
									<form action="/company/updateCompanyMsg" method="post" enctype="multipart/form-data" id="insertCompanyData" style="width:50%;margin-left:25%;">
										<table border="0" class="table table-striped table-hover">
											<tr>
												<th>公司名:<input type="hidden" name="company_id" id="updateCompany_id" ></th>
												<td><input type="text" name="company_name" required id="updateCompany_name" class="form-control"></td>
											</tr>
											<tr>
												<th>公司log图：</th>
												<td>
													<input type="file" name="myFile">
													<img src="" id="updateCompany_img" width="70px" height="70px" class="img-thumbnail">
												</td>
											</tr>		
											<tr>
												<th>公司地址：</th>
												<td><input type="text" name="company_address" required id="updateCompany_address" class="form-control"></td>
											</tr>	
											<tr>
												<th>公司联系电话：</th>
												<td><input type="text" name="company_phone" required id="updateCompany_phone" class="form-control"></td>
											</tr>	
											<tr>
												<th>公司介绍：</th>
												<td>
													<textarea name="company_introduce" required id="updateCompany_introduce"  class="form-control" rows="3">
												
													</textarea>
												</td>
											</tr>
											<tr>
												<td colspan="2" align='center'>
													<input type="submit" value="确认修改公司信息" class="btn btn-default">
												</td>
											</tr>
										</table>
									</form>
								</div>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	
	<!-- 自定义提示框 -->
	<div class="alterDiv" style="display:none;">
			<p>
				<font size="4">提示：</font>
			</p>
			<p style="padding-left:20px;width:75%;word-break:break-all;">
				<font size="3" id="alterContent">${msg}</font>
			</p>
			<p>
				<button id="alterBut">确定</button>
			</p>
			<p></p>
	</div>
</body>
</html>